
///@date  :2020/11/10/16:37
///desc：当前环境下的变量
///author：gyy

class Environment{

  //环境变量-枚举（默认是web-dev ）
  static EnvironmentEnum enumValue = EnvironmentEnum.web_dev;
  //域名
  static String baseUrl = "http://81.68.216.56:80/";
  //环境变量-tag
  static String tag = "web_dev/";
  //web版本号
  static String version = "V: 0.0.2";

  //初始化 web 生产环境
  static initWebPro() {
    enumValue = EnvironmentEnum.web_prod;
    baseUrl = "https://prod-xxx.com/";
    tag = "web_prod/";
  }
  //初始化 web 测试环境
  static initWebTest() {
    enumValue = EnvironmentEnum.web_test;
    baseUrl = "https://test-xxx.com/";
    tag = "web_test/";
  }

  //初始化native 生产环境
  static initNative() {
    enumValue = EnvironmentEnum.prod;
    baseUrl = "https://prod-xxx.com/";
    tag = "prod/";
  }
  //初始化native 测试环境
  static initNativeTest() {
    enumValue = EnvironmentEnum.test;
    baseUrl = "https://test-xxx.com/";
    tag = "test/";
  }

}

enum EnvironmentEnum{
  web_prod,
  web_test,
  web_dev,
  prod,
  test
}
